<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head> 
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
    <title>第十一课 引用类型（数组3）</title>
</head> 
<body>
    <script>
        // var arr1 = [100,200,300,400,500];
        // arr1.splice(1);
        // var newArr = arr1.splice(1,2);
        // arr1.splice(1,0,1000);
        // arr1.splice(1,1,1000);
        // console.log(arr1);
        // var arr1 = [100,200,300,400,500];
        // // var arr2 = [1,2,3];
        // // var arr3 = ['星星课堂'];
        // // var newArr = arr1.concat(arr2,arr3);   
        // // console.log(newArr);     
        // // console.log(arr1);     
        // // console.log(arr2);     
        // // console.log(arr3);
        // var newArr = arr1.concat(1,2,3);
        // console.log(newArr);   
        var arr1 = [100,200,300,400,500];
        var newArr = arr1.slice(1,3);
        // console.log(arr1.splice(1,3));
        console.log(newArr); 
        console.log(arr1);         
    </script>
</body> 
</html>